#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, maxn = -1, minn = 1e6, r[N], a[N];
bool t = true;
int main() {
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    cin >> n;
    int num1 = 0, num2 = 0;
    for(int i = 1; i <= n; i++) {
        cin >> r[i];
        if(r[i] > 2) t = false;
        a[r[i]]++;
    }
    if(t) {
        for(int i = 1; i <= n; i++) {
            if(r[i] == 1) num1++;
            else num2++;
        }
        if(num2 >= num1) cout << num2;
        else cout << num1;
    } else {
        sort(r + 1, r + n + 1);
        int len = unique(r + 1, r + n + 1) - r - 1;
        unique(r + 1, r + n + 1);
        int ans = -1;
        for(int i = 1; i <= len; i++) {
            ans = max(ans, a[r[i]]);
        }
        cout << ans;
    }
    return 0;
}
